import req from '../common/network'

export default {
  // 用户登录
  async logIn (data) {
    return await req({
      method: 'POST',
      url: '/users/login',
      data,
    })
  },
  // 搜索
  async search (params) {
    return await req({
      method: 'GET',
      url: '/users/simple_search',
      params,
    })
  },
  // 列表
  async list (params) {
    return await req({
      method: 'GET',
      url: '/users',
      params,
    })
  },
  // 详情
  async get (id) {
    return await req({
      method: 'GET',
      url: `/users/${id}`,
    })
  },
}
